package file;

import java.io.File;
import java.io.IOException;

public class CreatNewFileDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("./test.txt");
        boolean success = file.createNewFile();
        if (success) {
            System.out.println("创建成功...");
        }else {
            System.out.println("该文件已经存在！！！");
        }
    }
}
